package com.zim.aliot.async;

import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

import lombok.extern.slf4j.Slf4j;

@Component
@Slf4j
public class AsyncMns {
    
    @Async
    public void WorkerFunc(int i) {
        log.info("线程{}",i);
        
        for (int j = 0; j < 10000000; j++) {
            
        }
//      while (LifeController.start) {
//          try {
//                Message message = receiverService.receiveMessage();
//                entranceService.entrance(message.getMessageBodyAsString());
//            } catch (Exception e) {
//                log.error("[线程异常]");
//            }
//      }
        log.error("数据读取完了");
    }
}
